package com.gable.exhibition.dao;

import com.gable.exhibition.model.News;
import com.gable.exhibition.view.NewsView;

import java.util.List;

public interface NewsDao {
    int deleteByPrimaryKey(Long newsId);

    int insert(News record);

    int insertSelective(News record);

    News selectByPrimaryKey(Long newsId);

    int updateByPrimaryKeySelective(News record);

    int updateByPrimaryKey(News record);

    /**
     * 获取新闻总数  用于分页
     * @param newsView
     * @Create date 2018/3/9
     * @Create user jacky
     * @return
     */
    int queryNewsCount(NewsView newsView);

    /**
     * 获取新闻列表，分页
     * @param newsView
     * @Create date 2018/3/9
     * @Create user jacky
     * @return
     */
    List<NewsView> queryNewsList(NewsView newsView);

    /**
     * 获取新闻详情
     * @param newsId
     * @Create user jacky
     * @Create date 2018/3/9
     * @return
     */
    NewsView queryNewsInfo(Long newsId);
}